package com.softdev.pojo;

import com.softdev.common.AbstractBaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

@ApiModel("风险")
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "risks")
public class Risk extends AbstractBaseEntity implements Serializable {

    private static final long serialVersionUID = 345572801499995739L;

    @Column(name = "name")
    private String name;

    @Column(name = "type")
    private int type;

    @OneToMany(mappedBy = "risk")
    private List<ProjectRiskMapping> projects;

}
